import request from '@/utils/request';

//  待我审批列表
export async function getWaitApprovallist(params) {
    return request('/api/workflowweb/approve/v1/doing/list', {
        method: 'POST',
        data: params
    });
}
// 同意
export async function fetAgree(params) {
    return request('/api/workflowweb/approve/v1/pass', {
        method: 'POST',
        data: params
    });
}
// 拒绝
export async function fetrefuse(params) {
    return request('/api/workflowweb/approve/v1/refuse', {
        method: 'POST',
        data: params
    });
}
// 拒绝
export async function sendBack(params) {
    return request('/api/workflowweb/approve/v1/sendBack', {
        method: 'POST',
        data: params
    });
}
//  审批详情
export async function queryDetail(params) {
    return request('/api/workflowweb/approve/v1/doing/detail', {
        method: 'POST',
        data: params
    });
}
// 更改阅读状态
export async function fetchStatusChange(params) {
    return request(
        `/api/oa/v1/workflow/reading/updatereadingstatus?id=${params.id}&readingStatus=${params.readingStatus}`,
        {
            method: 'POST'
        }
    );
}

// 获取流程代理设置列表
export async function listTemplateAndAgent(parmas) {
    return request('/api/oa/v1/workflow/proxy/listtemplateandagent', {
        method: 'POST',
        data: parmas
    });
}
// 获取流程代理设置列表
export async function getProcessIsBlocked(id) {
    return request(`/api/workflowweb/processinstance/v1/getBussDealwithInfoByInstanceId?processInstanceId=${id}`, {
        method: 'GET'
    });
}
